package com.pilates.comparator;

import java.util.Comparator;

import com.pilates.diario.AulaPresenca;

public class AulaPresencaComparator implements Comparator<AulaPresenca> {

	public int compare(AulaPresenca o1, AulaPresenca o2) {
		if(o1 == o2)
			return 0;
		
		Long data1 = -1L;
		Long data2 = -1L;
		
		if(o1 != null){
			data1 = o1.getDia();
		}
		
		if(o2 != null){
			data2 = o2.getDia();
		}
		
		
		return data1.compareTo(data2);
	}

}
